<cfparam name="id" default="0">
<cfparam name="islocked" default="0">
<cfparam name="ctype" default="1">
<cfparam name="start" default="1">
<cfparam name="disp" default="25">
<cfparam name="page" default="1">
<cfset showform = 1>

<cfif isdefined('form.meta_title')>
<cfinvoke component="cfcs.common.dbqueries" method="updatedata" tablename="core_metadata" wherestring="WHERE id = #id#" />
<cfinvoke component="cfcs.common.shared" method="redirect" url="index.cfm?c=metadata&disp=#disp#&start=#start#&page=#page#&updateid=#id#" msg="Meta data was saved." />
<cfset showform = 0>
</cfif>

<cfif showform IS 1>
<cfoutput><a href = "index.cfm?c=metadata&disp=#disp#&start=#start#&page=#page#">Back to Meta Data</a></cfoutput>
<cfquery name = "qmeta" datasource="#request.dsn#">
SELECT * FROM core_metadata
WHERE id = <cfqueryparam value="#id#" cfsqltype="cf_sql_integer">
</cfquery>
<cfoutput query="qmeta">
<form method="post" action="index.cfm?c=metadata&a=edit" name="editdata" id="editdata">
  <table width="800" border="0" cellspacing="0" cellpadding="6">
      <tr>
        <td>Title</td>
        <td><input name="meta_title" type="text" id="meta_title" size="45" value="#meta_title#" /></td>
      </tr>
      <tr>
        <td> Description</td>
        <td><textarea name="meta_description" id="meta_description" style="width: 250px; height: 50px;">#meta_description#</textarea></td>
      </tr>
      <tr>
        <td> Keywords</td>
        <td><textarea name="meta_keywords" id="meta_keywords" style="width: 250px; height: 50px;">#meta_keywords#</textarea></td>
      </tr>
      <tr>
        <td>Abstract</td>
        <td><input name="meta_abstract" type="text" id="mega_abstract" size="45" value="#meta_abstract#" /></td>
      </tr>
      <tr>
        <td>MSN Bot</td>
        <td><input name="meta_msnbot" type="text" id="meta_msnbot" size="45" value="#meta_msnbot#" /></td>
      </tr>
      <tr>
        <td>Google Bot</td>
        <td><input name="meta_googlebot" type="text" id="meta_googlebot" size="45" value="#meta_googlebot#" /></td>
      </tr>
      <tr>
        <td>Robots</td>
        <td><input name="meta_robots" type="text" id="meta_robots" size="45" value="#meta_robots#" /></td>
      </tr>
      <tr>
        <td>Image</td>
        <td><input name="meta_image" type="text" id="meta_image" size="45" value="#meta_image#" /></td>
      </tr>
      <tr>
        <td>Record ID:</td>
        <td><input name="for_recid" type="text" id="for_recid" size="45" value="#for_recid#" /></td>
      </tr>
      <tr>
        <td>Variable:</td>
        <td><input name="recid_var" type="text" id="meta_image3" size="45" value="#meta_image#" /></td>
      </tr>
      <tr>
        <td>Lock Record?</td>
        <td><label style="width: 100%;">
          <input type="checkbox" name="islocked" id="islocked" value="1" <cfif islocked IS 1>checked="checked"</cfif> /> 
          Check here to lock this record so it can only be changed on this form (don't allow auto-updates)</label></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>
        <input type="hidden" name="id" value="#id#" id="id">
        <input type="hidden" name="start" value="#start#" id="start">
        <input type="hidden" name="disp" value="#disp#" id="disp">
        <input type="hidden" name="page" value="#page#" id="page">                
        <input type="submit" value="Save Data" id="abutton" name="submitbutton"></td>
      </tr>
  </table>
</form>
</cfoutput>
</cfif>